export const routerGuard = (url) => {
	const userinfo = uni.getStorageSync('userInfo');
	if (userinfo.openID) {
		if (url) {
			// 判断目标页面是否为 TabBar 页面
			const tabBarPages = ['/pages/home/index', '/pages/community/index', '/pages/mian/index',
				'/pages/equip/index', '/pages/myself/index'
			];
			if (tabBarPages.includes(url)) {
				uni.switchTab({
					url: url
				});
			} else {
				uni.navigateTo({
					url: url
				});
			}
		} else {
			console.log('暂无跳转');
		}
	} else {
		uni.navigateTo({
			url: '/pages/Login/Login'
		});
	}
}